package com.sop.dao.impl;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.sop.dao.WatchChangeRecordDao;
import com.sop.model.WatchArrangements;
import com.sop.model.WatchChangeRecord;
import com.sop.model.vo.WatchChangeRecordVo;
import common.base.dao.IBaseDaoImpl;

@Repository("watchChangeRecordDao")
public class WatchChangeRecordDaoImpl extends IBaseDaoImpl<WatchChangeRecord,WatchChangeRecordVo> implements WatchChangeRecordDao{

	@Override
	public Criteria getSearchCriteria(Session session,WatchChangeRecordVo searchVo) {
        Criteria c = session.createCriteria(WatchArrangements.class).createAlias("person","c");  
        
        if(searchVo.getWatchChangeRecord()!=null){
        //检索条件  
//            String name =  searchVo.getWatchChangeRecord().get().getName();  
//            if (StringTool.isStringAvaliable(name)) {  
//                c.add(Restrictions.ilike("c.name", "%" + name + "%"));  
//            }  
        }   
        return c;
	}
	
}
